<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var point = {
        x: 0,
        y: 0,
        moveTo: function(x, y) {
          this.x = this.x + x
          this.y = this.y + y
          console.log(this.x) // 1
          console.log(this.y) // 1
        }
      }
      point.moveTo(1, 1)
      // point.x = point.x + x => point.x = 0 + 1 = 1
      // point.y = point.y + y => point.y = 0 + 1 = 1
    </script>
  </body>
</html>
